import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import './router/config'
import 'lib-flexible/flexible'
import 'lib-flexible'
import store from './store/index'
// vant注册
import Vant from 'vant';
import 'vant/lib/index.css';
import { Lazyload,Dialog } from 'vant';
import loadingGif from './assets/images/Loading.gif'
import imgErr from './assets/images/ImgErr.png'
Vue.use(Lazyload,{
  loading: loadingGif,
  error: imgErr
});
Vue.use(Vant).use(Dialog);
// 全局方法
import tools from './config/tools'
Vue.prototype.$tools = tools;
// 工具类
import utils from './config/utils'
Vue.prototype.utils = utils;
import './http/config'
// 注册全局组件
import components from './config/components'
Vue.use(components);
//全局过滤器
import * as filters from './config/filter'
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
Vue.config.productionTip = false;
// 终端调试器 上线请把它注释掉
import './config/vconsole'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
